function closekeyboard(src,evnt)
%Stops Simulation if Keyboard Window is Closed

global closeflag
set_param('MyGlove_WithKeyboard','SimulationCommand','stop');
closeflag = 1;
end